aboutsummaryrefslogtreecommitdiff
path: root/pages/en/manga/[id].js
diff options
context:
space:
mode:
Diffstat (limited to 'pages/en/manga/[id].js')
-rw-r--r--pages/en/manga/[id].js8
1 files changed, 7 insertions, 1 deletions
diff --git a/pages/en/manga/[id].js b/pages/en/manga/[id].js
index 5e46599..eb53a93 100644
--- a/pages/en/manga/[id].js
+++ b/pages/en/manga/[id].js
@@ -159,7 +159,13 @@ export async function getServerSideProps(context) {
`https://api.anify.tv/chapters/${id}?apikey=${key}`
);
const data2 = await res2.json();
- chapter = data2;
+ if (data2.error) {
+ return {
+ notFound: true
+ }
+ } else {
+ chapter = data2;
+ }
}
return {